home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / RLaB 1.18c / manual / sort.tex < prev    next >
LaTeX Document  |  1994-02-23  |  971 b   |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: sort.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 73 6f 72 74 20 2d 2d |\section|{sort --|
|00000010| 2d 20 53 6f 72 74 20 4d | 61 74 72 69 78 7d 0d 5c |- Sort M|atrix}.\|
|00000020| 6c 61 62 65 6c 7b 66 6e | 3a 73 6f 72 74 7d 0d 5c |label{fn|:sort}.\|
|00000030| 69 6e 64 65 78 7b 6d 61 | 74 72 69 78 21 73 6f 72 |index{ma|trix!sor|
|00000040| 74 69 6e 67 7d 0d 5c 69 | 6e 64 65 78 7b 6f 72 64 |ting}.\i|ndex{ord|
|00000050| 65 72 69 6e 67 20 6d 61 | 74 72 69 78 7d 0d 5c 69 |ering ma|trix}.\i|
|00000060| 6e 64 65 78 7b 73 6f 72 | 74 28 29 7d 0d 5c 69 6e |ndex{sor|t()}.\in|
|00000070| 64 65 78 7b 73 6f 72 74 | 20 6d 61 74 72 69 78 7d |dex{sort| matrix}|
|00000080| 0d 5c 62 65 67 69 6e 7b | 72 61 69 6c 7d 0d 53 6f |.\begin{|rail}.So|
|00000090| 72 74 20 3a 20 27 73 6f | 72 74 27 20 27 28 27 20 |rt : 'so|rt' '(' |
|000000a0| 4d 61 74 72 69 78 20 27 | 29 27 20 3b 0d 5c 65 6e |Matrix '|)' ;.\en|
|000000b0| 64 7b 72 61 69 6c 7d 0d | 0d 5c 76 65 72 62 2b 73 |d{rail}.|.\verb+s|
|000000c0| 6f 72 74 2b 20 68 61 73 | 20 74 77 6f 20 64 69 66 |ort+ has| two dif|
|000000d0| 66 65 72 65 6e 74 20 66 | 6f 72 6d 73 2c 20 64 65 |ferent f|orms, de|
|000000e0| 70 65 6e 64 69 6e 67 20 | 6f 6e 20 69 74 73 20 61 |pending |on its a|
|000000f0| 72 67 75 6d 65 6e 74 2e | 20 20 49 66 0d 74 68 65 |rgument.| If.the|
|00000100| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 61 20 72 | argumen|t is a r|
|00000110| 6f 77 20 6f 72 20 63 6f | 6c 75 6d 6e 20 76 65 63 |ow or co|lumn vec|
|00000120| 74 6f 72 2c 20 61 20 6c | 69 73 74 20 63 6f 6e 74 |tor, a l|ist cont|
|00000130| 61 69 6e 69 6e 67 20 74 | 77 6f 20 76 65 63 74 6f |aining t|wo vecto|
|00000140| 72 73 0d 69 73 20 72 65 | 74 75 72 6e 65 64 2e 20 |rs.is re|turned. |
|00000150| 20 42 6f 74 68 20 76 65 | 63 74 6f 72 73 20 77 69 | Both ve|ctors wi|
|00000160| 6c 6c 20 62 65 20 74 68 | 65 20 73 61 6d 65 20 73 |ll be th|e same s|
|00000170| 69 7a 65 20 61 73 20 74 | 68 65 20 61 72 67 75 6d |ize as t|he argum|
|00000180| 65 6e 74 2e 20 20 4f 6e | 65 0d 76 65 63 74 6f 72 |ent. On|e.vector|
|00000190| 20 77 69 6c 6c 20 62 65 | 20 6e 61 6d 65 64 20 5c | will be| named \|
|000001a0| 76 65 72 62 2b 76 61 6c | 2b 2c 20 61 6e 64 20 77 |verb+val|+, and w|
|000001b0| 69 6c 6c 20 63 6f 6e 74 | 61 69 6e 20 74 68 65 20 |ill cont|ain the |
|000001c0| 73 61 6d 65 20 65 6c 65 | 6d 65 6e 74 73 20 61 73 |same ele|ments as|
|000001d0| 0d 74 68 65 20 61 72 67 | 75 6d 65 6e 74 2c 20 62 |.the arg|ument, b|
|000001e0| 75 74 20 73 6f 72 74 65 | 64 20 69 6e 20 61 73 63 |ut sorte|d in asc|
|000001f0| 65 6e 64 69 6e 67 20 6d | 61 67 6e 69 74 75 64 65 |ending m|agnitude|
|00000200| 2e 20 20 54 68 65 20 6f | 74 68 65 72 20 76 65 63 |. The o|ther vec|
|00000210| 74 6f 72 20 69 73 0d 6e | 61 6d 65 64 20 5c 76 65 |tor is.n|amed \ve|
|00000220| 72 62 2b 69 6e 64 2b 2c | 20 61 6e 64 20 74 65 6c |rb+ind+,| and tel|
|00000230| 6c 73 20 79 6f 75 20 77 | 68 65 72 65 20 74 68 65 |ls you w|here the|
|00000240| 20 5c 76 65 72 62 2b 76 | 61 6c 2b 20 65 6c 65 6d | \verb+v|al+ elem|
|00000250| 65 6e 74 0d 61 73 73 6f | 63 69 61 74 65 64 20 77 |ent.asso|ciated w|
|00000260| 69 74 68 20 69 74 20 77 | 61 73 20 69 6e 20 74 68 |ith it w|as in th|
|00000270| 65 20 61 72 67 75 6d 65 | 6e 74 2e 20 49 66 20 74 |e argume|nt. If t|
|00000280| 68 65 20 61 72 67 75 6d | 65 6e 74 20 69 73 20 61 |he argum|ent is a|
|00000290| 20 73 74 72 69 6e 67 0d | 76 65 63 74 6f 72 2c 20 | string.|vector, |
|000002a0| 74 68 65 6e 20 74 68 65 | 20 73 6f 72 74 69 6e 67 |then the| sorting|
|000002b0| 20 69 73 20 64 6f 6e 65 | 20 69 6e 20 61 6c 70 68 | is done| in alph|
|000002c0| 61 62 65 74 69 63 61 6c | 20 6f 72 64 65 72 2e 0d |abetical| order..|
|000002d0| 0d 49 66 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |.If the |argument|
|000002e0| 20 69 73 20 6e 6f 74 20 | 61 20 76 65 63 74 6f 72 | is not |a vector|
|000002f0| 2c 20 74 68 65 6e 20 74 | 68 65 20 73 61 6d 65 20 |, then t|he same |
|00000300| 74 68 69 6e 67 20 68 61 | 70 70 65 6e 73 2c 20 65 |thing ha|ppens, e|
|00000310| 78 63 65 70 74 0d 74 68 | 61 74 20 65 61 63 68 20 |xcept.th|at each |
|00000320| 63 6f 6c 75 6d 6e 20 6f | 66 20 74 68 65 20 61 72 |column o|f the ar|
|00000330| 67 75 6d 65 6e 74 20 69 | 73 20 73 6f 72 74 65 64 |gument i|s sorted|
|00000340| 20 69 6e 20 74 75 72 6e | 2e 20 0d 0d 5c 70 61 72 | in turn|. ..\par|
|00000350| 61 67 72 61 70 68 7b 45 | 78 61 6d 70 6c 65 7d 0d |agraph{E|xample}.|
|00000360| 5c 69 6e 64 65 78 7b 65 | 78 61 6d 70 6c 65 20 6f |\index{e|xample o|
|00000370| 66 20 73 6f 72 74 28 29 | 7d 0d 5c 69 6e 64 65 78 |f sort()|}.\index|
|00000380| 7b 73 6f 72 74 28 29 21 | 65 78 61 6d 70 6c 65 7d |{sort()!|example}|
|00000390| 0d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|000003a0| 7d 0d 44 75 6d 6d 79 20 | 45 78 61 6d 70 6c 65 0d |}.Dummy |Example.|
|000003b0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 0d |\end{ver|batim}..|
|000003c0| 5c 6e 65 77 70 61 67 65 | 0d 0d 0d |\newpage|... |
+--------+-------------------------+-------------------------+--------+--------+